# Maintainer: Alistair Francis <alistair@alistair23.me>
pkgname=py3-bleak
_pyname=bleak
pkgver=0.22.3
pkgrel=0
pkgdesc="Bluetooth Low Energy platform Agnostic Klient"
url="https://github.com/hbldh/bleak"
arch="noarch"
license="MIT"
depends="
	python3
	bluez
	dbus
	py3-dbus-fast
	"
makedepends="py3-gpep517 py3-installer py3-poetry-core py3-wheel bluez-dev dbus-dev"
checkdepends="py3-pytest py3-setuptools py3-pexpect"
source="py3-bleak-$pkgver.tar.gz::https://github.com/hbldh/bleak/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir"/$_pyname-$pkgver

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 1>&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest -k 'not test_python_render_simple_indent_guides and not test_python_render_line_range_indent_guides'
}

package() {
	python3 -m installer -d "$pkgdir" .dist/*.whl
}

sha512sums="
068544fad4b53f7d7c6f12abc505af1582e7a432df5750c3ff4f902c53b00bf9eadecb609e565a2edfdf53235147136d39b6f86a62fab3f1a683f33b6db4fdd9  py3-bleak-0.22.3.tar.gz
"
